#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
@author: yinzhuoqun
@site: http://xieboke.net/
@email: yin@zhuoqun.info
@time: 2020/6/3 10:17
"""

from django import template

register = template.Library()


@register.filter
def str_to_int(value):
    return int(value) if value.isdigit() else False
